// pages/Index/Customer/VIPCardInfo.js
const app = getApp();
const controller=require("../../controllers/Controller").controller

Page({
  data: {
    dataInfo:{},
  },
  onLoad: function (options) {
    let id = options.id||96;
    let shopId=options.shopId
    this.getInfo(id,shopId);
  },
  getInfo: function (id,shopId) {
      
    
    let that = this; 
    controller.getVipCardDetail({accountVipId: id,shopId:shopId}).then(data =>{
      that.setData({
        dataInfo:data.data
      });//api/vip/details
    });
  },
  toUrl(e) {
    var d = e.currentTarget.dataset;
    let url = d.url;
    console.info(url);
    wx.navigateTo({
      url: url
    });
  },
  onBack(){
    wx.navigateBack();
  }

})